<div class="dux-tools">
  <div class="bread-head">第三方代码 <span class="small">如客服代码，统计代码</span> </div>
  <br>
  <div class="tools-function clearfix">
    <div class="float-left"> <a class="button button-small bg-main icon-list" href="__URL__"> 代码管理</a> </div>
    <?php if(model('user_group')->model_power('fragment','add')){ ?>
    <div class="button-group float-right"> <a class="button button-small bg-dot icon-plus dropdown-toggle"> 添加代码 <span class="downward"></span></a>
      <ul class="drop-menu pull-right">
        <li><a href="__URL__/add">添加代码</a></li>
      </ul>
    </div>
   <?php } ?>
  </div>
</div>
<div class="admin-main">
  <form action="__URL__/{$action}_save/time-<?php echo time(); ?>-ajax-true" method="post" id="form" class="form-x dux-form form-auto">
    <div class="panel dux-box  active">
    <div class="panel-head"> <strong>{$action_name}代码</strong> </div>
    <div class="panel-body">
      <div class="form-group">
        <div class="label">
          <label>描述</label>
        </div>
        <div class="field">
          <input name="title" type="text" class="input" id="title" value="{$info.title}" reg="\S" msg="描述不能为空" />
          <div class="input-note">描述代码用途</div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>标识</label>
        </div>
        <div class="field">
          <input name="sign" type="text" class="input" id="sign" reg="[a-zA-Z_]" msg="标识只能为英文和下划线" value="{$info.sign}" />
          <div class="input-note">前台调用标识</div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>内容</label>
        </div>
        <div class="field">
          <?php echo module('editor')->get_editor('content'); ?>
         <textarea name="content" style="width:100%; height:350px;" id="content" class="input">{$info.content html}</textarea>
        <?php echo module('editor')->get_editor_upload('editor_upload','editor_content') ?>
        <input type="button" id="editor_upload" class="button_small" style="margin-top:10px;" value="上传图片和文件到编辑器" />
          <div class="input-note"></div>
        </div>

      </div>
    </div>
   <?php if(model('user_group')->model_power('fragment','add')||model('user_group')->model_power('fragment','edit')){ ?>
    <!--普通提交-->
    <div class="panel-foot">
      <div class="form-button">
        <div id="tips"></div>
       <input name="id" type="hidden" value="{$info.id}" />
        <input name="file_id" id="file_id" type="hidden" value="{$file_id}" />
        <button type="submit" class="button bg-main">保存</button>
      </div>
    </div>
    <?php } ?>
  </form>
</div>
</div>
<script type="text/javascript">
//提交表单
savelistform({addurl:"__URL__/add",listurl:"__URL__"});
</script>